-
Couldn't load subscription status.
- Fork 837
Fix Redis cache error when a query has no chunks to lookup #2700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Marco Pracucci <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>
…ommand' Signed-off-by: Marco Pracucci <[email protected]>
|
@pstibrany @jtlisi I've done further changes after your initial review. May you take another look, please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This was introduce in cortexproject#2700, more specifically this line https://github.com/cortexproject/cortex/pull/2700/files#diff-10bca0f4f31a2ca1edc507d0289b143dR537 This causes any query with the first label matcher not matching anything to return all matches of all other labels. This is a nasty one since, the code was relying on empty slice, and so it would skip nil values instead of returning no matches. I've added a regression test proving this is fixed everywhere. I think in cortex it can probably affect performance (since you have to download all chunk not required) but not read integrity. I have found this with @slim-bean while deploying Loki, all queriers where OOMing because of this. Signed-off-by: Cyril Tovena <[email protected]>
This was introduce in cortexproject#2700, more specifically this line https://github.com/cortexproject/cortex/pull/2700/files#diff-10bca0f4f31a2ca1edc507d0289b143dR537 This causes any query with the first label matcher not matching anything to return all matches of all other labels. This is a nasty one since, the code was relying on empty slice, and so it would skip nil values instead of returning no matches. I've added a regression test proving this is fixed everywhere. I think in cortex it can probably affect performance (since you have to download all chunk not required) but not read integrity. I have found this with @slim-bean while deploying Loki, all queriers where OOMing because of this. Signed-off-by: Cyril Tovena <[email protected]>
* Fixes an issue in the index chunks/series intersect code. This was introduce in #2700, more specifically this line https://github.com/cortexproject/cortex/pull/2700/files#diff-10bca0f4f31a2ca1edc507d0289b143dR537 This causes any query with the first label matcher not matching anything to return all matches of all other labels. This is a nasty one since, the code was relying on empty slice, and so it would skip nil values instead of returning no matches. I've added a regression test proving this is fixed everywhere. I think in cortex it can probably affect performance (since you have to download all chunk not required) but not read integrity. I have found this with @slim-bean while deploying Loki, all queriers where OOMing because of this. Signed-off-by: Cyril Tovena <[email protected]> * Update changelog. Signed-off-by: Cyril Tovena <[email protected]>
This was introduce in cortexproject#2700, more specifically this line https://github.com/cortexproject/cortex/pull/2700/files#diff-10bca0f4f31a2ca1edc507d0289b143dR537 This causes any query with the first label matcher not matching anything to return all matches of all other labels. This is a nasty one since, the code was relying on empty slice, and so it would skip nil values instead of returning no matches. I've added a regression test proving this is fixed everywhere. I think in cortex it can probably affect performance (since you have to download all chunk not required) but not read integrity. I have found this with @slim-bean while deploying Loki, all queriers where OOMing because of this. Signed-off-by: Cyril Tovena <[email protected]> (cherry picked from commit 1ff971d)
* Fixes an issue in the index chunks/series intersect code. This was introduce in #2700, more specifically this line https://github.com/cortexproject/cortex/pull/2700/files#diff-10bca0f4f31a2ca1edc507d0289b143dR537 This causes any query with the first label matcher not matching anything to return all matches of all other labels. This is a nasty one since, the code was relying on empty slice, and so it would skip nil values instead of returning no matches. I've added a regression test proving this is fixed everywhere. I think in cortex it can probably affect performance (since you have to download all chunk not required) but not read integrity. I have found this with @slim-bean while deploying Loki, all queriers where OOMing because of this. Signed-off-by: Cyril Tovena <[email protected]> * Update changelog. Signed-off-by: Cyril Tovena <[email protected]>
What this PR does:
Redis chunks cache lookup can fail with the error
ERR wrong number of arguments for 'mget' commandif a query has no chunks to lookup from storage. This happens because we don't correctly handle the caseSeriesStore.GetChunkRefs()returns no chunks.Which issue(s) this PR fixes:
Fixes #2133
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]